Skip to main content

ApiObject

Every event function receives the yeet API object as its first argument. Here you will find all the functions and constructors to interact with the yeet elements.

Topbar

UI

In the UI group, you will find the following functions:

getObject()

getObject(id, type, sourceConfigType?, sourceConfigId?) => yeetRuntimeObject

Create a new RuntimeObject by specifying the unique ID and the component type. If a component is to be used outside of the active main container, you must also specify the ID and component type of the main container.

NameTypeDescription
idnumberComponent ID general > meta > componentId
typestringComponent type general > meta > componentType
sourceConfigType (optional)stringMain container type general > meta > componentType
sourceConfigId (optional)idMain container ID general > meta > componentId

As a return object, you will receive your yeetRuntimeObject.

actions

create()

create(rpcName, actionName) => yeetActionObject

If you want to execute a C16 function on the yeetCore, you can create an action object with the create() method. The action object will then be internally registered and can be queried by the action name. You can then execute the function, control the status, or query the result through the action object.

NameTypeDescription
rpcNamestringC16 action name
actionName (optional)stringIf no actionName is provided, the action is registered under the rpcName.

As a return object, you will receive your yeetActionObject.

delete()

delete(actionName) => void

If you want to delete an yeetActionObject, you can unregister the yeetActionObject using the action name.

NameTypeDescription
actionNamestringRegistered action name

There is no return object.

get()

get(actionName) => yeetActionObject

Once you have registered an yeetActionObject, you can retrieve it at any time using the action name.

NameTypeDescription
actionNamestringRegistered action name

As a return object, you will receive your yeetActionObject.

Clipboards

ClipboardEntityDelete()

ClipboardEntityDelete(ClipboardId) => void

If you want to delete an entity entry, the ClipboardEntityDelete function sends a command to the Clipboard with the provided ClipboardId. The Clipboard then deletes the record with the RecordID that has been entered under the Keys group with _id.

danger

To execute this command, the Clipboard must have "use Entity" activated, and all necessary entity properties must be specified.

NameTypeDescription
ClipboardIdnumberUnique Clipboard ID.

There is no return object.

ClipboardEntityUpdate()

ClipboardEntityUpdate(ClipboardId) => void

If an entity entry needs to be modified, the ClipboardEntityUpdate function sends a command to the Clipboard with the given ClipboardId. The Clipboard updates the record with the RecordID specified under the Keys group with _id. To do this, the values of the Clipboard properties are transferred. These should have the same names as the entity properties.

info

To allow a Clipboard to capture all entity properties, the properties can be generated from the entity using AutoProperties. To do this, the AutoProperties function must be activated for the entity properties under Clipboards.

danger

For the Clipboard to execute this command, "use Entity" must be enabled in the Clipboard, and all necessary entity properties must be specified.

NameTypeDescription
ClipboardIdnumberUnique Clipboard ID.

There is no return object.

ClipboardEntityRead()

ClipboardEntityRead(ClipboardId) => void

If you want to read an entity entry, the ClipboardEntityRead function sends a command to the Clipboard with the provided ClipboardId. The Clipboard then loads the record with the RecordID specified under the Keys group at _id. The loaded data is then stored in the corresponding Clipboard properties with the same name. Once all the data is loaded into the Clipboard properties, an update is sent to all recipient components listening to the Clipboard via SourceLink.

danger

For the Clipboard to execute this command, "use Entity" must be enabled in the Clipboard, and all necessary entity properties must be specified.

NameTypeDescription
ClipboardIdnumberUnique Clipboard ID.

There is no return object.

ClipboardUpdate()

ClipboardUpdate(ClipboardId, value) => void

If multiple Clipboard properties need to be updated, a JavaScript payload is passed in which the Clipboard property names are used as property names, and underneath, the new values are entered.

{
property1: "text",
property2: 2
}

Once all the data is loaded into the Clipboard properties, an update is sent to all recipient components listening to the Clipboard via SourceLinks.

NameTypeDescription
ClipboardIdnumberUnique Clipboard ID.
valueFrontEndyeetODataTypesJavascript-Object that describes every updated Clipboardproperty

There is no return object.

ClipboardRead()

ClipboardRead(ClipboardId) => Promise<FrontEndyeetODataTypes>

To retrieve all Clipboard properties, you specify the ClipboardId and receive a FrontEndyeetODataTypes object via a Promise. This object contains an entry for each Clipboard property.

NameTypeDescription
ClipboardIdnumberUnique Clipboard ID.

As a return object, you receive a FrontEndyeetODataTypes object.

setEntityKeys()

setEntityKeys(ClipboardId, keyName, keyValue) => void

To enable the Clipboard to load a different entity entry, the entity key must be set. With the yeet database, you only need to set the entity property _id. If other OData sources become available in the future, you can also set multiple entity keys using the functions.

NameTypeDescription
ClipboardIdnumberUnique Clipboard ID.
keyNamestringName of the entity key property
keyValuenumberNew value of the entity key property

There is no return object.

getEntityKeys()

getEntityKeys(ClipboardId) => Promise<FrontEndyeetODataTypes>

If you want to know which entity entry your Clipboard is currently pointing to, you can retrieve the unique identifier of the entry with getEntityKeys.

NameTypeDescription
ClipboardIdnumberUnique Clipboard ID.

As a return object, you receive a promise that returns a FrontEndyeetODataTypes object.

propertyUpdate()

propertyUpdate(ClipboardId, propertyName, value) => void

With propertyUpdate, you can use JavaScript to set a new value in a Clipboard property.

NameTypeDescription
ClipboardIdnumberUnique Clipboard ID.
propertyNamestringClipboard-Property-Name
valuestring, numberNeuer Propertywert

There is no return object.

propertyRead()

propertyRead(ClipboardId, propertyName) => void

With propertyRead, you can read a value from a Clipboard property.

NameTypeDescription
ClipboardIdnumberUnique Clipboard ID.
propertyNamestringClipboard property name

As a return object, you receive a promise that returns a string or number.

odata

odataEntityCreate()

odataEntityCreate(entityName, entityValue, baseUrl?) => Promise<yODataResponse<unknown>>

You can use odataEntityCreate to create a new entity entry using JavaScript.

NameTypeDescription
entityNamestringName of the entity in the database
entityValueFrontEndyeetODataTypesObject containing data for the entity properties
baseUrl (optional)stringURL to another yeet database (not yet supported)

As a return object, you will receive a Promise which returns the newly created entity entry. Since the id is automatically assigned, you can directly retrieve the RecordID of your new entry.

odataEntityDelete()

odataEntityDelete(entityName: string, entityKeyPropertyValues: FrontEndyeetODataTypes, baseUrl?: string | undefined) => Promise<yODataResponse<unknown>>

To delete an entity entry, you need to provide an object that contains all the entity keys and their corresponding values. In the yeet database, there is always only one entity key (_id), which is the record related id.

NameTypeDescription
entityNamestringName of the entity in the database
entityKeyPropertyValuesFrontEndyeetODataTypesObject containing all the entity key values of the entry to be deleted
baseUrl (optional)stringURL to another yeet database (not yet supported)

As a return object, you receive a promise that returns an empty string upon completion.

odataEntityRead()

odataEntityRead(entityName, query, entityKeyValues, baseUrl?) => Promise<yODataResponse<unknown>>

To read an entity entry, you can pass a yODataQuery object to retrieve a list of entity entries, or you can select a specific entry using entityKeyValues. In the yeet database, there is always only one entity key(_id), which is the record related id.

NameTypeDescription
entityNamestringName of the entity in the database
queryyODataQuery | undefinedObject with various options to load a list of entities
entityKeyValuesFrontEndyeetODataTypesObject containing all entity key values of the entity entry to be read
baseUrl (optional)stringURL to another yeet database (not yet supported)

As a return object, you will receive a promise that is filled with an array containing all queried entity entries.

odataEntityUpdate()

odataEntityUpdate(entityName, entityValue, entityKeyPropertyValues, baseUrl?) => Promise<>

To update an entity entry, you can provide a object to specify the entries to be updated. You also need to provide the entityKeyPropertyValues object to determine which entity entry should be modified. In the yeet database, there is always only one entity key (_id), which is the record related id.

NameTypeDescription
entityNamestringName of the entity in the database
entityValueFrontEndyeetODataTypesObject containing new values for the entity properties
entityKeyPropertyValuesFrontEndyeetODataTypesObject containing all the entity key values of the entity entry to be modified
baseUrl (optional)stringURL to another yeet database (not yet supported)

The return object is a promise without a return value.

odataMetaData()

odataMetaData(baseUrl?) => Promise<yODataMetadata>

The metadata of the database can be retrieved using odataMetaData.

NameTypeDescription
baseUrl (optional)stringURL to another yeet database (not yet supported)

As a return object, you will receive a Promise that returns a MetadataObject. Here, you can find all entities, enums, and actions.

popupClose()

popupClose(popupId) => void

You can use popupClose to close a popup by specifying its popup ID.

NameTypeDescription
popupIdnumberComponentID of the yPopup generic > meta > componentId

There is no return object.

popupOpen()

popupOpen(popupId, componentType, componentId, parentType, parentId) => void

You can use popupOpen to open a popup by specifying its popup ID. Additionally, you indicate which component should be used as the positioning reference. To do this, provide the id and type of the component, and specify the id and type of the MainContainer where the component is stored.

NameTypeDescription
popupIdnumberComponent ID of the yPopup generic > meta > componentId
componentTypestringComponent type from which it was opened.
componentIdnumberComponent id from which it was opened.
parentTypestringMainContainer type from which it was opened.
parentidnumberMainContainer id from which it was opened.

There is no return object.

user

Metadata for the logged-in user.

NameTypeDescription
namestringUsername of the logged-in user.
rolestringRole of the user.
tokenstring(Currently not supported)
refreshTokenstring(Currently not supported)

types

Constructors for creating complex property values.

colorValue

To create a ColorValue, you can use the following hexadecimal values.

  • transparent
  • #FFF
  • #FFFFFF
  • #FF00FFFF

All input values are stored in the hex8 property as #RRGGBBAA (hex8 color).

class ColorValue {
hex8 : string
constructor(hexString)
}

columnValue

To create a custom table column

class columnValue {

field: StringProperty;
type: StringProperty;
nullable: BooleanProperty;
displayEditDialog: StringProperty;
displayTable: StringProperty;
sort: StringProperty;
filter: BooleanProperty;
label: StringProperty;
name: StringProperty;
visible: BooleanProperty;
sticky: BooleanProperty;
orderId: NumberProperty;
userCreated: BooleanProperty;

bodyCell__minWidth: UnitNumberProperty | undefined;
bodyCell__maxWidth: UnitNumberProperty | undefined;
bodyCell__fontAlignHorizontal: StringProperty | undefined;
bodyCell__fontAlignVertical: StringProperty | undefined;
bodyCell__bgColor: ColorProperty | undefined;
bodyCell__fontSize: UnitNumberProperty | undefined;
bodyCell__fontWeight: NumberProperty | undefined;
bodyCell__fontColor: ColorProperty | undefined;

columnHeader__fontAlignHorizontal: StringProperty | undefined;
columnHeader__fontAlignVertical: StringProperty | undefined;
columnHeader__bgColor: ColorProperty | undefined;
columnHeader__fontSize: UnitNumberProperty | undefined;
columnHeader__fontWeight: NumberProperty | undefined;
columnHeader__fontColor: ColorProperty | undefined;

constructor(
field = "NoField"
type = "string",
nullable = false,
displayEditDialog = "y-input",
displayTable = "text",
sort = "none",
filter = true,
label = "NoLabel",
visible = true,
orderId = -1,
userCreated = false

bodyCell__minWidth: UnitNumberValue | undefined = undefined,
bodyCell__maxWidth: UnitNumberValue | undefined = undefined,
bodyCell__fontAlignHorizontal: String | undefined = undefined,
bodyCell__fontAlignVertical: String | undefined = undefined,

columnHeader__fontAlignHorizontal: String | undefined = undefined,
columnHeader__fontAlignVertical: String | undefined = undefined,
columnHeader__bgColor: ColorValue | undefined = undefined,
bodyCell__bgColor: ColorValue | undefined = undefined,
sticky = false,

columnHeader__fontSize: UnitNumberValue | undefined = undefined,
columnHeader__fontWeight: NumberValue | undefined = undefined,
bodyCell__fontSize: UnitNumberValue | undefined = undefined,
bodyCell__fontWeight: Number | undefined = undefined,
columnHeader__fontColor: ColorValue | undefined = undefined,
bodyCell__fontColor: ColorValue | undefined = undefined
);
}
NameTypeDescription
fieldStringEntity property name
typeStringEntity property type
nullableBooleanIs Null an valid value
displayEditDialogStringControl how the value gets displayed for edit
displayTableStringControls how the values get visualized in table
sortStringColumn sort
filterBooleanShow filter options
labelStringColumn label
nameStringUniqe column name
visibleBooleanHide column
stickyBooleanSticky Column(always visible)
orderIdNumberOrder position
userCreatedBooleanColumn is createdy by user
bodyCell__minWidthUnitNumberValue | undefinedOverride column min width
bodyCell__maxWidthUnitNumberValue | undefinedOverride column max width
bodyCell__fontAlignHorizontalString | undefinedOverride hoizontal content alignment
bodyCell__fontAlignVerticalString | undefinedOverride vertical content alignment
bodyCell__bgColorColorValue | undefinedOverride column background color
bodyCell__fontSizeUnitNumberValue | undefinedOverride column font size
bodyCell__fontWeightNumberValue | undefinedOverride column font weight
bodyCell__fontColorColorValue | undefinedOverride column font color
columnHeader__fontAlignHorizontalString | undefinedOverride columnheader hoizontal content alignment
columnHeader__fontAlignVerticalString | undefinedOverride columnheader vertical content alignment
columnHeader__bgColorColorValue | undefinedOverride columnheader background color
columnHeader__fontSizeUnitNumberValue | undefinedOverride columnheader font size
columnHeader__fontWeightNumber | undefinedOverride columnheader font weight
columnHeader__fontColorColorValue | undefinedOverride columnheader font color

OptionListValue

Object to specify an option of a selection.

class OptionListValue {
value: string;
label: string;
icon?: string;
tooltip?: string;
constructor();
constructor(initValue: string);
constructor(initValue: string, initLabel: string);
constructor(initValue: string, initLabel: string, initIcon: string);
constructor(initValue: string, initLabel: string, initIcon?: string, initToolTip?: string);
constructor(initValue?: string, initLabel?: string, initIcon?: string, initToolTip?: string);
}
NameTypeDescription
valueStringOption value
labelStringDisplay value
icon (optional)StringIcon name
tooltip (optional)StringTooltip text

UnitNumberValue

Creating a unit value consisting of a numerical value and a unit. Unit and value can be specified separately or as a string.

export class UnitNumberValue {
value: number;
unit: string;

constructor();
constructor(value: string);
constructor(value: number);
constructor(value: number, unit: string);
constructor(value: number | string = 0, unit = "px");

cssValue() => string;
}
NameTypeDescription
valueNumberNumber value
unitStringUnittype
cssValue()FunctionReturn a string used for css classes

Objecttypes

yODataQuery

Optional query properties

let queryOptions = {
$filter?: string;
$select?: string[];
$skip?: number;
$top?: number;
}
NameTypeDescription
$filter (optional)StringOdata filter string
$select (optional)String[]Which entity properties should be loaded
$skip (optional)NumberHow many entries to skip
$top (optional)NumberHow many entity records to load

PropertyValueTypes

type PropertyValueTypes =
| string
| number
| boolean
| UnitNumberValue
| ColorValue
| ValidatorListValue[]
| OptionListValue[]
| ColumnValue[];

FrontEndyeetODataTypes

interface FrontEndyeetODataTypes {
[key: string]: FrontEndyeetODataType;
}

FrontEndyeetODataType

type Front FrontEndyeetODataType =
string | number | boolean | null

yeetRuntimeObject

This object represent a component config

class yeetRuntimeObject {
get(category, group, property) => Propertytypes;
set(category, group, property) => void;
property(category, group, property) => yeetRuntimeProperty;
reset(category, group, property) => void;
}

get()

get(category, group, property) => Propertytype;
NameTypeDescription
categorystringPropertycategory
groupstringPropertygroup
propertystringPropertyname

As a return object, you will receive the property value.

set()

set(category, group, property, value) => void;
NameTypeDescription
categorystringPropertycategory
groupstringPropertygroup
propertystringPropertyname
valuePropertyValuetypesNew property value

There is no return object.

property()

Creates a yeetRuntimeProperty. With this, you can directly set the property without having to specify the property path.

property(category, group, property) => yeetRuntimeProperty;
NameTypeDescription
categorystringProperty category
groupstringProperty group
propertystringProperty name

As a return object, you will receive the yeetRuntimeProperty.

reset()

Indicates that the property should be set again by the theme.

info

Not all properties can be set by a theme.

reset(category, group, property) => void;
NameTypeDescription
categorystringProperty category
groupstringProperty group
propertystringProperty name

There is no return object.

yeetRuntimeProperty

This object represent a component property

class yeetRuntimeObjectProperty {
get()=>PropertyValueTypes;
set(value: PropertyValueTypes)=>void;
reset()=>void;
}

get()

Gets the value of the property.

get() => PropertyValueTypes;

As a return object, you receive a PropertyValueType object.

set()

Sets the value of the property.

set(value) => PropertyValueTypes;
NameTypeDescription
valuePropertyValueTypesneues Value für die Property

There is no return object.

reset()

Indicates that the property should be set again by the theme.

info

Not all properties can be set by a theme.

reset() => void;

There is no return object.